$OpenBSD: patch-src_libnet_link_bpf_c,v 1.2 2013/12/05 18:34:48 naddy Exp $
--- src/libnet_link_bpf.c.orig	Wed Jan 28 20:45:00 2004
+++ src/libnet_link_bpf.c	Thu Dec  5 19:25:50 2013
@@ -28,7 +28,6 @@
  */
 
 #include <sys/param.h>  /* optionally get BSD define */
-#include <sys/timeb.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
 
@@ -43,6 +42,7 @@
 #include <sys/sysctl.h>
 #include <net/route.h>
 #include <net/if_dl.h>
+#include <net/if_types.h>
 #include "../include/gnuc.h"
 #include "../include/bpf.h"
 
@@ -308,9 +308,13 @@ libnet_get_hwaddr(libnet_t *l)
     for (next = buf ; next < end ; next += ifm->ifm_msglen)
     {
         ifm = (struct if_msghdr *)next;
+        if (ifm->ifm_version != RTM_VERSION)
+            continue;
         if (ifm->ifm_type == RTM_IFINFO)
         {
             sdl = (struct sockaddr_dl *)(ifm + 1);
+            if (sdl->sdl_type != IFT_ETHER)
+                continue;
             if (strncmp(&sdl->sdl_data[0], l->device, sdl->sdl_nlen) == 0)
             {
                 if (!(ea = malloc(sizeof(struct libnet_ether_addr))))
